<%--
  Created by IntelliJ IDEA.
  User: qiliping
  Date: 15/11/22
  Time: 下午12:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>


<html>
<head>
    <title>基金列表</title>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            基金管理
            <small>基金净值走势</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/main">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="${ctx}/product">
                    基金管理
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    基金净值列表
                </a>
            </li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->
<!------内容区----->
<div class="main">

    <div class="row">
        <div class="col-md-12">
            <div class="text-right">
                <a href="${ctx}/product/add_net_value/${productId}" class="btn blue">添加净值</a>
            </div>
        </div>
    </div>

        <div class="row">
            <div class="col-md-12">
                <div id="container"></div>
            </div>
        </div>

    </form>
</div>
<!------[end]内容区----->
<myfooter>
    <script src="${ctx}/assets/scripts/stock/highstock.js"></script>
    <script src="${ctx}/assets/scripts/stock/modules/exporting.js"></script>
    <%--<script src="https://code.highcharts.com/stock/highstock.js"></script>--%>
    <%--<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>--%>
    <script type="text/javascript">
        /*var udata = [[1375315200000,65.24],
            [1375401600000,66.08],
            [1375660800000,67.06],
            [1375747200000,66.46],
            [1375833600000,66.43],
            [1375920000000,65.86],
            [1376006400000,64.92],
            [1376265600000,66.77],
            [1376352000000,69.94]];*/

        $(function () {
                $('#container').highcharts('StockChart', {
                    rangeSelector: {
                        selected: 1
                    },
                    credits: {
                        enabled: false
                    }, exporting: {
                        enabled: false
                    },rangeSelector : {
                        enabled: false
                    },
                    navigator: {
                        enabled: false
                    },
                    title: {
                        text: '收益走势图'
                    },
                    xAxis: {
                        tickPixelInterval: 200,//x轴上的间隔
                        //  title :{
                        //      text:"title"
                        //  },
                        type: 'datetime', //定义x轴上日期的显示格式
                        labels: {
                            formatter: function() {
                                var vDate=new Date(this.value);
                                //alert(this.value);
                                return vDate.getFullYear()+"-"+(vDate.getMonth()+1)+"-"+vDate.getDate();
                            },
                            align: 'center'
                        }
                    },
                    tooltip: {
                        xDateFormat: '%Y-%m-%d'//鼠标移动到趋势线上时显示的日期格式
                    },
                    series: [{
                        name: '收益',
                        data: ${netvalues},
                        tooltip: {
                            valueDecimals: 2
                        }
                    }]
                });
            });

    </script>
</myfooter>
</body>
</html>